<?php

namespace App\Http\Controllers\Front;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class Index extends Controller
{
    use \App\Traits\CacheTrait;
    public $menuSelected = 'index';

    public function index()
    {
        //\View::addExtension('html', 'php');
        //return view()->file('static/web/index/index.html');
        $viewData = [
            'seo' => $this->returnSeoInfo('tanwin_index'),
            'selectedMenu' => parent::MENU_INDEX,
        ];
        return view('web.index', $viewData);
    }

    public function indexV31()
    {
        //\View::addExtension('html', 'php');
        //return view()->file('static/web/index/index.html');
        $viewData = [
            'seo' => $this->returnSeoInfo('tanwin_index'),
            'selectedMenu' => parent::MENU_INDEX,
        ];
        return view('web.v3.index', $viewData);
    }


    public function getDomainChildrenList(Request $request)
    {
        $id = $request->input('id');
        $domainList = $this->cacheGetDomainChildrenList($id);
        echo json_encode($domainList);
    }
}
